/*
 * ConnexioSQL.java
 *
 */
package org.wooxes.server;

import java.sql.*;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author woox
 */
public class ConnexioSQL {
    
    private static final String DRIVER = "org.postgresql.Driver";
    private static final String USER   = "gwt";
    private static final String PASS   = "google";
    private static final String URL    = "jdbc:postgresql://localhost:5432/gwt";

    public Connection getConnection() {
        Connection connection = null;
        try {
            Class.forName(DRIVER);
            connection = DriverManager.getConnection(URL, USER, PASS);
        } catch (SQLException ex) {
            Logger.getLogger(ConnexioSQL.class.getName()).log(Level.SEVERE, null, ex);
        } catch (ClassNotFoundException ex) {
            Logger.getLogger(ConnexioSQL.class.getName()).log(Level.SEVERE, null, ex);
        }
        return connection;
    }
}
